/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 *
 * @format
 */
import React, {useState} from 'react';
import {View, Text} from 'react-native';
import CustomTransitionView from 'transition-view/src/TransitionViewNativeComponent';

const App = () => {
  const [buttonClick, setButtonClick] = useState(false);

  return (
    <View style={{padding: 20}}>
      <CustomTransitionView
        transitionText={'ButtonView: ' + (buttonClick ? 'Click' : 'No Click')}
        style={{height: 50, width: 200, backgroundColor: 'blue'}}
        onTransitionClick={e => {
          setButtonClick(e.nativeEvent.isTransitionClick);
        }}
        transition={{transitionType: 'Ease', duration: 2000}}>
        <View>
          <Text>{buttonClick.toString()}</Text>
          <Text>11111</Text>
        </View>
        <Text>123456</Text>
      </CustomTransitionView>
    </View>
  );
};

export default App;
